package com.welink.biz.dao.name;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.welink.biz.common.model.NameDO;

@SuppressWarnings("deprecation")
public class NameDAOImpl extends SqlMapClientDaoSupport implements NameDAO {

    private Logger log = Logger.getLogger(NameDAOImpl.class);

    @SuppressWarnings("unchecked")
    public List<NameDO> queryNames() {
        try {
            HashMap<Object, Object> map = new HashMap<Object, Object>();
            return this.getSqlMapClientTemplate().getSqlMapClient()
                .queryForList("NameDAO.getNames", map);
        } catch (SQLException e) {
            log.error("获取names失败: exp:" + e.getMessage());
        }
        return null;
    }
}
